'use strict';
Object.defineProperties(exports, {
  __esModule: { value: !0 },
  [Symbol.toStringTag]: { value: 'Module' },
});
function I(n, e) {
  return (n << e) | (n >>> (32 - e));
}
function l(n, e) {
  let f, o, u, c, a;
  return (
    (u = n & 2147483648),
    (c = e & 2147483648),
    (f = n & 1073741824),
    (o = e & 1073741824),
    (a = (n & 1073741823) + (e & 1073741823)),
    f & o
      ? a ^ 2147483648 ^ u ^ c
      : f | o
        ? a & 1073741824
          ? a ^ 3221225472 ^ u ^ c
          : a ^ 1073741824 ^ u ^ c
        : a ^ u ^ c
  );
}
function L(n, e, f) {
  return (n & e) | (~n & f);
}
function M(n, e, f) {
  return (n & f) | (e & ~f);
}
function V(n, e, f) {
  return n ^ e ^ f;
}
function D(n, e, f) {
  return e ^ (n | ~f);
}
function b(n, e, f, o, u, c, a) {
  return (n = l(n, l(l(L(e, f, o), u), a))), l(I(n, c), e);
}
function i(n, e, f, o, u, c, a) {
  return (n = l(n, l(l(M(e, f, o), u), a))), l(I(n, c), e);
}
function S(n, e, f, o, u, c, a) {
  return (n = l(n, l(l(V(e, f, o), u), a))), l(I(n, c), e);
}
function C(n, e, f, o, u, c, a) {
  return (n = l(n, l(l(D(e, f, o), u), a))), l(I(n, c), e);
}
function P(n) {
  let e,
    f = n.length,
    o = f + 8,
    c = ((o - (o % 64)) / 64 + 1) * 16,
    a = Array(c - 1),
    x = 0,
    t = 0;
  for (; t < f; )
    (e = (t - (t % 4)) / 4),
      (x = (t % 4) * 8),
      (a[e] = a[e] | (n.charCodeAt(t) << x)),
      t++;
  return (
    (e = (t - (t % 4)) / 4),
    (x = (t % 4) * 8),
    (a[e] = a[e] | (128 << x)),
    (a[c - 2] = f << 3),
    (a[c - 1] = f >>> 29),
    a
  );
}
function G(n) {
  let e = '',
    f = '',
    o,
    u;
  for (u = 0; u <= 3; u++)
    (o = (n >>> (u * 8)) & 255),
      (f = '0' + o.toString(16)),
      (e = e + f.substring(f.length - 2, f.length));
  return e;
}
function _(n) {
  n = n.replace(
    /\x0d\x0a/g,
    `
`,
  );
  let e = '';
  for (let f = 0; f < n.length; f++) {
    let o = n.charCodeAt(f);
    o < 128
      ? (e += String.fromCharCode(o))
      : o > 127 && o < 2048
        ? ((e += String.fromCharCode((o >> 6) | 192)),
          (e += String.fromCharCode((o & 63) | 128)))
        : ((e += String.fromCharCode((o >> 12) | 224)),
          (e += String.fromCharCode(((o >> 6) & 63) | 128)),
          (e += String.fromCharCode((o & 63) | 128)));
  }
  return e;
}
function j(n) {
  let e = Array(),
    f,
    o,
    u,
    c,
    a,
    x,
    t,
    r,
    d,
    m = 7,
    h = 12,
    g = 17,
    s = 22,
    T = 5,
    p = 9,
    W = 14,
    y = 20,
    A = 4,
    H = 11,
    O = 16,
    w = 23,
    B = 6,
    F = 10,
    N = 15,
    v = 21;
  for (
    n = _(n),
      e = P(n),
      x = 1732584193,
      t = 4023233417,
      r = 2562383102,
      d = 271733878,
      f = 0;
    f < e.length;
    f += 16
  )
    (o = x),
      (u = t),
      (c = r),
      (a = d),
      (x = b(x, t, r, d, e[f + 0], m, 3614090360)),
      (d = b(d, x, t, r, e[f + 1], h, 3905402710)),
      (r = b(r, d, x, t, e[f + 2], g, 606105819)),
      (t = b(t, r, d, x, e[f + 3], s, 3250441966)),
      (x = b(x, t, r, d, e[f + 4], m, 4118548399)),
      (d = b(d, x, t, r, e[f + 5], h, 1200080426)),
      (r = b(r, d, x, t, e[f + 6], g, 2821735955)),
      (t = b(t, r, d, x, e[f + 7], s, 4249261313)),
      (x = b(x, t, r, d, e[f + 8], m, 1770035416)),
      (d = b(d, x, t, r, e[f + 9], h, 2336552879)),
      (r = b(r, d, x, t, e[f + 10], g, 4294925233)),
      (t = b(t, r, d, x, e[f + 11], s, 2304563134)),
      (x = b(x, t, r, d, e[f + 12], m, 1804603682)),
      (d = b(d, x, t, r, e[f + 13], h, 4254626195)),
      (r = b(r, d, x, t, e[f + 14], g, 2792965006)),
      (t = b(t, r, d, x, e[f + 15], s, 1236535329)),
      (x = i(x, t, r, d, e[f + 1], T, 4129170786)),
      (d = i(d, x, t, r, e[f + 6], p, 3225465664)),
      (r = i(r, d, x, t, e[f + 11], W, 643717713)),
      (t = i(t, r, d, x, e[f + 0], y, 3921069994)),
      (x = i(x, t, r, d, e[f + 5], T, 3593408605)),
      (d = i(d, x, t, r, e[f + 10], p, 38016083)),
      (r = i(r, d, x, t, e[f + 15], W, 3634488961)),
      (t = i(t, r, d, x, e[f + 4], y, 3889429448)),
      (x = i(x, t, r, d, e[f + 9], T, 568446438)),
      (d = i(d, x, t, r, e[f + 14], p, 3275163606)),
      (r = i(r, d, x, t, e[f + 3], W, 4107603335)),
      (t = i(t, r, d, x, e[f + 8], y, 1163531501)),
      (x = i(x, t, r, d, e[f + 13], T, 2850285829)),
      (d = i(d, x, t, r, e[f + 2], p, 4243563512)),
      (r = i(r, d, x, t, e[f + 7], W, 1735328473)),
      (t = i(t, r, d, x, e[f + 12], y, 2368359562)),
      (x = S(x, t, r, d, e[f + 5], A, 4294588738)),
      (d = S(d, x, t, r, e[f + 8], H, 2272392833)),
      (r = S(r, d, x, t, e[f + 11], O, 1839030562)),
      (t = S(t, r, d, x, e[f + 14], w, 4259657740)),
      (x = S(x, t, r, d, e[f + 1], A, 2763975236)),
      (d = S(d, x, t, r, e[f + 4], H, 1272893353)),
      (r = S(r, d, x, t, e[f + 7], O, 4139469664)),
      (t = S(t, r, d, x, e[f + 10], w, 3200236656)),
      (x = S(x, t, r, d, e[f + 13], A, 681279174)),
      (d = S(d, x, t, r, e[f + 0], H, 3936430074)),
      (r = S(r, d, x, t, e[f + 3], O, 3572445317)),
      (t = S(t, r, d, x, e[f + 6], w, 76029189)),
      (x = S(x, t, r, d, e[f + 9], A, 3654602809)),
      (d = S(d, x, t, r, e[f + 12], H, 3873151461)),
      (r = S(r, d, x, t, e[f + 15], O, 530742520)),
      (t = S(t, r, d, x, e[f + 2], w, 3299628645)),
      (x = C(x, t, r, d, e[f + 0], B, 4096336452)),
      (d = C(d, x, t, r, e[f + 7], F, 1126891415)),
      (r = C(r, d, x, t, e[f + 14], N, 2878612391)),
      (t = C(t, r, d, x, e[f + 5], v, 4237533241)),
      (x = C(x, t, r, d, e[f + 12], B, 1700485571)),
      (d = C(d, x, t, r, e[f + 3], F, 2399980690)),
      (r = C(r, d, x, t, e[f + 10], N, 4293915773)),
      (t = C(t, r, d, x, e[f + 1], v, 2240044497)),
      (x = C(x, t, r, d, e[f + 8], B, 1873313359)),
      (d = C(d, x, t, r, e[f + 15], F, 4264355552)),
      (r = C(r, d, x, t, e[f + 6], N, 2734768916)),
      (t = C(t, r, d, x, e[f + 13], v, 1309151649)),
      (x = C(x, t, r, d, e[f + 4], B, 4149444226)),
      (d = C(d, x, t, r, e[f + 11], F, 3174756917)),
      (r = C(r, d, x, t, e[f + 2], N, 718787259)),
      (t = C(t, r, d, x, e[f + 9], v, 3951481745)),
      (x = l(x, o)),
      (t = l(t, u)),
      (r = l(r, c)),
      (d = l(d, a));
  return (G(x) + G(t) + G(r) + G(d)).toLowerCase();
}
exports.default = j;
